<h1>Listing messages</h1>

<table>
  <tr>
  </tr>

<% @messages.each do |message| %>
  <tr>
	<td><%=h message.to_endpoint %>@<%=h message.to_domain%></td>
	<td><%=h message.raw_message %></td>
	<td><%= link_to 'Show', message_path(params[:domain], params[:endpoint], message) %></td>
	<td><%= link_to 'Edit', edit_message_path(params[:domain], params[:endpoint], message) %></td>
  </tr>
<% end %>
</table>

<br />
<%= link_to 'New message', new_message_path(params[:domain], params[:endpoint]) %>
